//
//  KKUser.h
//  ReplyAssistant
//
//  Created by Leo on 2018/11/23.
//  Copyright © 2018 KK. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^KKUserStatusDidUpdateBlockHandle)(BOOL isLogin);

@interface KKUser : NSObject

//  登录成功
+ (void)loginWithJson:(NSDictionary*)json;

//  登录成功
+ (void)loginWithJson:(NSDictionary *)json nickName:(nullable NSString*)nickname headImg:(nullable NSString*)headImg;

//  退出登录
+ (void)exit;

//  同步读取数据
+ (void)synchronizationReadData;

@property (nonatomic, strong, nullable) NSString *nickName;   //昵称
@property (nonatomic, strong, nullable) NSString *headimg;    //头像
@property (nonatomic, assign) BOOL online;          //是否在线

+ (instancetype)defaultUser;

//  获取授权id
+ (NSString*)ticket;
//  用户id
+ (NSString*)uid;
//  用户是否登录
+ (BOOL)isLogin;

//  加载详情信息
+ (void)loadingUserDefailInfoWithJson:(NSDictionary*)json;

@property (nonatomic, assign) NSInteger message;        //发送的消息数量
@property (nonatomic, assign) NSInteger customer;       //接收的顾客数量
@property (nonatomic, strong) NSString *team;           //服务公司名称

@property (nonatomic, strong) KKUserStatusDidUpdateBlockHandle updateBlock;     //用户状态更新

@end

NS_ASSUME_NONNULL_END
